#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back
#define vec vector<int>

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);return x*sgn;}

const int N = 3e5+10;

pii seg[N];
int n,m;

struct BIT{
	int tr[N];
	void add(int x,int y){for(;x <= m;x += x & -x) tr[x] += y;}
	int query(int x,int y = 0){for(;x;x -= x & -x) y += tr[x]; return y;}
}T;

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in,m = in;
	for(int i = 1;i <= n;i++) seg[i].fi = in,seg[i].se = in;
	sort(seg + 1,seg + n + 1,[&](pii x,pii y){return x.se - x.fi < y.se - y.fi;});
	printf("%d\n",n);
	for(int i = 2,j = 1;i <= m;i++){
		while(j <= n && seg[j].se - seg[j].fi + 1 < i) T.add(seg[j].fi,1),T.add(seg[j].se + 1,-1),j++;
		int tot = 0; for(int k = i;k <= m;k += i) tot += T.query(k); printf("%d\n",tot + n - j + 1);
	}
	return 0;
}
